//
//  SecondViewController.m
//  07-UIViewController生命周期
//
//  Created by 402030900@qq.com on 16/7/22.
//  Copyright © 2016年 402030900@qq.com. All rights reserved.
//

#import "SecondViewController.h"

@interface SecondViewController ()

@end

@implementation SecondViewController
// loadView ViewDidView ViewWillAppear
// 以上三个方法,会插在上一个视图控制器 viewWillDisappear 与 viewDidDisappear
-(void)loadView{
    [super loadView];
    NSLog(@"%@-----%s",[self class],__FUNCTION__);
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithRed:1.000 green:0.364 blue:0.331 alpha:1.000];
    // Do any additional setup after loading the view.
}
// 视图将要出现时就会调用
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    NSLog(@"%@-----%s",[self class],__FUNCTION__);
    
    
}
// 视图已经出现时,就会调用
-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    NSLog(@"%@-----%s",[self class],__FUNCTION__);
    
}
// 视图将要消失,就会调用,只要有一点消失
-(void)viewWillDisappear:(BOOL)animated{
    
    [super viewWillDisappear:animated];
    NSLog(@"%@-----%s",[self class],__FUNCTION__);
    
}
// 视图完全消失,会调用
-(void)viewDidDisappear:(BOOL)animated{
    [super viewDidDisappear:animated];
    NSLog(@"%@-----%s",[self class],__FUNCTION__);
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
